package system

import (
	"github.com/gin-gonic/gin"
	"server/api"
)

type BaseRouter struct {
}

// 初始化基础路由
func (s *BaseRouter) InitPublicBaseRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
	R = Router.Group("base")
	var baseApi = api.ApiGroupApp.SystemApiGroup.BaseApi
	{
		R.POST("login", baseApi.Login)
		R.GET("captcha", baseApi.Captcha)
	}
	return
}

// 初始化基础路由
func (s *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
	R = Router.Group("base")
	var baseApi = api.ApiGroupApp.SystemApiGroup.BaseApi
	{
		R.GET("user-info", baseApi.UserInfo)
		R.POST("logout", baseApi.Logout)
		R.GET("get-menu", baseApi.GetMenu)
		R.GET("geographic", baseApi.Geographic)
		R.POST("user-update", baseApi.UserUpdate)
		R.POST("user-reset-pwd", baseApi.UserResetPwd)
	}
	return
}
